
import {Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn} from 'typeorm';
import {dateTransformer} from "../../../../common/utils";

@Entity('student_psychological_spectrum', {
    comment: '学生心理光谱表，存储孩子的心理评估数据和报告',
})
export class SpectrumEntity {
	@PrimaryGeneratedColumn({ type: 'int', name: 'id', comment: 'id' })
	public id: number;

	@Column({ type: 'int', name: 'child_id', default: null, comment: '孩子ID' })
	public childId: number;

	@Column({ type: 'int', name: 'emotion_flow', default: null, comment: '情绪流露维度数值' })
	public emotionFlow: number;

	@Column({ type: 'int', name: 'self_expression', default: null, comment: '自我表达维度数值' })
	public selfExpression: number;

	@Column({ type: 'int', name: 'behavior_attribution', default: null, comment: '行为归因维度数值' })
	public behaviorAttribution: number;

	@Column({ type: 'int', name: 'difficulty_coping', default: null, comment: '困境应对维度数值' })
	public difficultyCoping: number;

	@Column({ type: 'int', name: 'interaction_initiative', default: null, comment: '互动主动维度数值' })
	public interactionInitiative: number;

	@Column({ type: 'varchar', name: 'report_tags', default: '', comment: 'report_tags' })
	public reportTags: string;

	@Column({ type: 'text', name: 'report_content', default: null, comment: 'report_content' })
	public reportContent: string;

	@Column({ type: 'char', name: 'del_flag', default: false, comment: '删除标志' })
	public delFlag: string;

	@CreateDateColumn({ type: 'datetime', name: 'start_time', default: null, transformer: dateTransformer, comment: '开始时间' })
	public startTime: Date;

	@UpdateDateColumn({ type: 'datetime', name: 'end_time', default: null, transformer: dateTransformer, comment: '结束时间' })
	public endTime: Date;

	@CreateDateColumn({ type: 'datetime', name: 'create_time', default: null, transformer: dateTransformer, comment: '创建时间' })
	public createTime: Date;

	@UpdateDateColumn({ type: 'datetime', name: 'update_time', default: null, transformer: dateTransformer, comment: '更新时间' })
	public updateTime: Date;

}
